<template>
  <div class="index-window border-shadow">
				<p class="quick-t"><i class="el-icon-document"></i>通知公告</p>
				<div class="window-box" style="display:block;padding:0 15px;">
					<ul>
						<li v-for="(item,index) in notice" @click="showDialog(item)" :key="index">
							<p class="list-content">{{item.eText}}</p>
							<div>{{item.eSelect}}<span>{{item.eStartTime}}</span></div>
						</li>
					</ul>
					<el-dialog
							title="通知公告详情"
							:visible.sync="dialogVisible"
							width="30%"
							>
							<div class="dialog-container" :model="dialogInfo">
									<p class="dialog-box">{{dialogInfo.eSelect}}</p>
									<p class="t-r">{{dialogInfo.eStartTime}}</p>
							</div>
							<span slot="footer" class="dialog-footer">
									<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
							</span>
							</el-dialog>
				</div>
			</div>
</template>
<style lang='scss'>
  /*引入无须编译的css文件*/
  @import '../../../assets/index.scss';
</style>
<script>
import axios from 'axios'
import { getDemoListPage } from '@/api/api';
  export default {
    data() {
      return {
				notice:[],
				dialogVisible: false,
				dialogInfo:{}
      };
		},
		methods:{
			getDemo() {//获取列表数据
        var _this = this;
        let para = { //参数
            currentpage:1,
            number:10,
            eSelectId:0,
            eText: "",
            eRadio:""
        };
        getDemoListPage(para).then((res) => {
            console.log("通知公告")
            console.log(res.data.result.row);
            _this.notice =res.data.result.row;
        });
    	},
			showDialog(row){
				this.dialogVisible=true;
				this.dialogInfo = row;
			}
		},
		mounted(){
			this.getDemo()
		}
  };
</script>